Efficient Decoding and Post-Processing of High Dynamic Range Images

ABSTRACT

A decoder receives for decoding and post-processing for display an HDR (high dynamic range) image comprising a first coded image (e.g., a JPEG-HDR baseline image) and a second coded image (e.g., a JPEG-HDR ratio image). The first coded image is partially decoded and post-processed according to a post-processing command (e.g., scaling) to output a first decoded and post-processed image. The second coded image is also partially decoded and post-processed according to the post-processing command to output a second decoded and post-processed image. The first and the second decoded and post-processed images are combined to output a decoded HDR image according to the post-processing command.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Provisional Application No. 61/532,413, filed Sep. 8, 2011, hereby incorporated by reference in its entirety.

TECHNOLOGY

The present invention relates generally to images. More particularly, an embodiment of the present invention relates to the efficient decoding and post-processing of high dynamic range images.

BACKGROUND

As used herein, the term ‘dynamic range’ (DR) may relate to a capability of the human psychovisual system (HVS) to perceive a range of intensity (e.g., luminance, luma) in an image, e.g., from darkest darks to brightest brights. In this sense, DR relates to a ‘scene-referred’ intensity. DR may also relate to the ability of a display device to adequately or approximately render an intensity range of a particular breadth. In this sense, DR relates to a ‘display-referred’ intensity. Unless a particular sense is explicitly specified to have particular significance at any point in the description herein, it should be inferred that the term may be used in either sense, e.g. interchangeably.

As used herein, the term high dynamic range (HDR) relates to a DR breadth that spans the some 14-15 orders of magnitude of the human visual system (HVS). For example, well adapted humans with essentially normal (e.g., in one or more of a statistical, biometric or opthamological sense) have an intensity range that spans about 15 orders of magnitude. Adapted humans may perceive dim light sources of as few as a mere handful of photons. Yet, these same humans may perceive the near painfully brilliant intensity of the noonday sun in desert, sea or snow (or even glance into the sun, however briefly to prevent damage). This span though is available to ‘adapted’ humans, e.g., those whose HVS has a time period in which to reset and adjust.

Until fairly recently, displays have had a significantly narrower DR than HDR. Television (TV) and computer monitor apparatus that use typical cathode ray tube (CRT), liquid crystal display (LCD) with constant fluorescent white back lighting or plasma screen technology may be constrained in their DR rendering capability to approximately three orders of magnitude. Such conventional displays thus typify a low dynamic range (LDR), also referred to as a standard dynamic range (SDR), in relation to HDR.

To support backwards compatibility as well as new HDR display technologies, an HDR image may be represented by a tone-mapped image (typically referred to as the baseline image) with additional metadata comprising grayscale luminance ratios (typically, referred to as a ratio image). On one hand, the tone-mapped image may be used to provide support for standard dynamic range imaging workflows (e.g., displaying images on SDR imaging devices). On the other hand, the additional metadata (e.g., the ratio image) may be used with the tone-mapped image to generate, recover, or present an HDR image (e.g., by an HDR display).

As used herein, the terms “up-sampling” or “up-scaling” relate to the process of transforming one or more color components of an image from one spatial resolution to a second, higher, spatial resolution. For example, an image may be up-sampled from a 720×480 spatial resolution to a 1280×720 spatial resolution.

As used herein, the terms “down-sampling” or “down-scaling” relate to the process of transforming one or more color components of an image from one spatial resolution to a second, lower, spatial resolution. For example, an image may be down-sampled from a 1280×720 spatial resolution to a 720×480 spatial resolution.

As used herein, the term “windowing” relates to the process of selecting and displaying an area of the image that is smaller than the total area of the image. For example, if the original image has a spatial resolution of 1280×720 pixels, a window operation may select to display only portion of that image, e.g., an area of 720×480 pixels with origin the top, left-most pixel, of the image.

Given a coded image comprising multiple coded regions, the terms “partial decoding” or “decoding in part” relate to a decoding process where only part of the coded image is decoded, either in the spatial domain or a transform domain. For example, given a JPEG image which is coded using a plurality of 8×8 blocks of DCT (Discrete Cosine Transform) coefficients, partial decoding in the transform domain may be performed by decoding each coded block using an N×N inverse DCT, where N is an integer and 1≦N<8. Similarly, partial decoding in the spatial domain may be performed by decoding only a sub-set of the total number of 8×8 blocks in the coded image.

Mobile devices, such as smart phones or electronics tablets, have typical screen resolutions that are much smaller than the native resolution of captured SDR or HDR images. In most cases, before displaying a high-resolution image on such a device, after decoding, the image is post-processed by such operations as windowing, scaling, and cropping. Under existing techniques, these operations may require extensive memory and computational resources.

The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, issues identified with respect to one or more approaches should not assume to have been recognized in any prior art on the basis of this section, unless otherwise indicated.

BRIEF DESCRIPTION OF THE DRAWINGS

An embodiment of the present invention is illustrated by way of example, and not in way by limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which:

FIG. 1 depicts an example file structure of an HDR image stored in the JPEG-HDR format;

FIG. 2 depicts an example HDR image decoder according to an embodiment of the present invention;

FIG. 3 depicts an example processing flow for HDR image decoding and post-processing according to an embodiment of the present invention; and

FIG. 4 depicts an example processing flow for JPEG-HDR image decoding and post-processing according to an embodiment of the present invention.

DESCRIPTION OF EXAMPLE EMBODIMENTS

Efficient decoding and image post-processing of high dynamic range (HDR) images is described herein. In the following description, for the purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are not described in exhaustive detail, in order to avoid unnecessarily occluding, obscuring, or obfuscating the present invention.

Overview

Example embodiments described herein relate to the efficient decoding, image post-processing, and display of HDR images. Example image post-processing operations include up-scaling, down-scaling, and windowing of an HDR image. A decoder receives for decoding and post-processing for display an HDR (high dynamic range) image comprising a first coded image (e.g., a JPEG-HDR baseline image) and a second coded image (e.g., a JPEG-HDR ratio image). The first coded image is partially decoded and post-processed according to a post-processing command (e.g., scaling or windowing) to output a first decoded and post-processed image. The second coded image is also partially decoded and post-processed according to the post-processing command to output a second decoded and post-processed image. The first and the second decoded and post-processed images are combined to output a decoded HDR image according to the post-processing command.

Example HDR Image Processing System

FIG. 1 depicts an example file structure of an HDR image encoded in what will be referred herein as the JPEG-HDR image format. The JPEG-HDR format, originally described in “G. Ward and M. Simmons, JPEG-HDR: a backwards-compatible, high dynamic range extension to JPEG, Proc. of the thirteenth Color Imaging conference, pp. 283-290,” uses a standard JFIF (JPEG File Interchange Format) file wrapper to encapsulate two images: a JPEG-compressed tone-mapped version of the original HDR image, referred to herein as the baseline image, and a compressed ratio image. A standard JPEG image decoder may decode only the baseline image and ignore the data related to the ratio image; however, a JPEG-HDR image decoder can combine the baseline image and the ratio image to decode an HDR image.

As depicted in FIG. 1, a JPEG-HDR image comprises a JPEG Header 110, JPEG-coded data for a baseline image 120, and a set of one or more JPEG application markers 130 defining the characteristics of a ratio image 140. In some embodiments the ratio image may only comprise compressed luminance (e.g., Y) ratio data (140-1), typically stored in logarithmic format. In some other embodiments, a ratio image 140 may also comprise optional chroma (e.g., Cb and Cr) data (140-2). Embodiments of the present invention support either configuration of a JPEG-HDR file format.

HDR Image Decoder

FIG. 2 illustrates an example HDR image decoder, in accordance with some possible embodiments of the present invention. In an example embodiment, the HDR image decoder is implemented by one or more computing devices, and configured with software and/or hardware components that implement image processing techniques for decoding HDR image data (denoted as HDR 202 in FIG. 2) comprising a tone mapped baseline image (e.g., 120) and HDR reconstruction data (e.g., ratio image 140). In an example embodiment, HDR reconstruction data refers to luminance ratio values, Cb and Cr residual values, and parameters and auxiliary data related to the foregoing data. In an example embodiment, the image data to be decoded by the HDR image decoder is in an image file in a JFIF image format (e.g., JPEG-HDR).

The HDR image decoder may comprise a parser 210 configured to receive the HDR image data 202 (e.g., a JPEG-HDR image) and to parse the HDR image data 202 into the baseline image 212 and one or more application markers (e.g., application marker 130) storing the ratio image data 227. In an example embodiment, the parser 210 is a standard JPEG decoder.

The HDR image decoder may also comprise a baseline image decoder 220 and a ratio image decoder 230. In an embodiment, the baseline and the ratio images may be coded as JPEG images, hence the baseline and ratio image decoding may comprise the following sequence of operations: a variable length coder (VLC) decoding, inverse discrete cosine transformations (IDCT), and inverse quantization (IQ) or de-quantization. The output of the ratio image decoder 230 may yield luminance ratio data 232 (coded in logarithmic format) and Chroma residual data 234.

The HDR image decoder may also comprise an inverse logarithm processing block (Exp 235) configured to convert logarithmic luminance ratios 232 into luminance ratios in a linear domain (e.g., 237). The luminance ratios 237 are multiplied with the baseline image data 222 to derive an intermediate HDR image 247. They may also be multiplied with and optional residual chroma data 234 to derive scaled residual data 242. Finally, the intermediate HDR data 247 and the scaled residual data 242 are combined (e.g., added) to produce the decoded HDR data 252.

Some embodiments may also include additional operations on the decoding of baseline and ratio images, such as gamma correction and color transformations.

Image Post-Processing

In most display devices, especially portable displays, the native resolution of a display is typically far smaller than the resolution of a captured HDR image. For example, a 2 Mpixel (MP) image may have a 1632×1224 spatial resolution and an 8 MP image may have a 3264×2448 spatial resolution. In contrast, the display of a typical smartphone may have a 480×800 spatial resolution. Thus, after decoding an image, there is a need for image post-processing so that the whole image or part of an image can be displayed properly on a screen. Such image post-processing operations may include:

-   -   Down-scaling, where an image or part of an image is scaled down     -   Windowing, where only a selected portion of an image is         displayed     -   Up-scaling, where part of the image is scaled up—usually after a         windowing operation     -   Sharpening, where an image or part of an image is manipulated         (e.g., by using unsharp masking techniques) to look sharper     -   Rotation, where an image or part of an image is rotated     -   Color-related operations, such as brightness and contrast         enhancement

Given a coded HDR image, such post-processing operations may be performed after the HDR image is fully decoded, e.g., for a JPEG-HDR image, after applying the process depicted in FIG. 2. However, HDR images require more than 8 bits per color component. Thus, storing and post-processing such images may be computationally intensive, especially on mobile devices with limited memory and computational resources. Furthermore, many mobile devices may integrate 8-bit-based hardware accelerators for the fast decoding, post-processing, and display of SDR images (e.g., hardware JPEG decoders). An embodiment of the present invention is to disclose methods that take full advantage of such hardware accelerators when decoding HDR images.

An example embodiment performs post-processing operations separately on the baseline and ratio images of an HDR image, thus reducing the memory and processing requirements. Since baseline and ratio images are typically stored using SDR-like resolutions (e.g., 8-bits per image component), separate post-processing of the baseline and ratio images may also take full advantage of any integrated image processing accelerator engines.

FIG. 3 depicts an example decoding and post-processing process for HDR images according to an embodiment of this invention. A coded HDR image 310 may comprise two or more separate coded sub-images, e.g., a coded (e.g., JPEG-compressed) baseline image and a coded ratio image. Upon receiving a post-processing command, e.g., a command to down-scale the input image so that it can be displayed on a lower-resolution display, in an embodiment, the HDR decoder may decode and post-process its sub-images separately, before combining them again (335) to form an HDR image suitable for display or other post-processing.

These decoding and post processing operations (315, 320, 325, and 330) on the HDR sub-images may depend on a variety of factors, such as the coded format of the input HDR image and the type of post-processing operation to be performed.

In an embodiment, processing efficiencies may be preserved or promoted depending on the post-processing command, with decoding of the coded HDR sub-images in part (e.g., partial decoding), rather than decoding in whole. Partial decoding may be performed either in the spatial domain or a transform domain.

In an example embodiment, the image is received in a JPEG-HDR format, e.g., as depicted in FIG. 1. FIG. 4 depicts an example decoding and post-processing process according to an embodiment wherein in a JPEG-HDR image both the baseline and ratio images may be coded using the JPEG standard. According to the JPEG specification (ISO/IEC 10918-1:1994), an image is coded by dividing it into a plurality of 8×8 pixel-wide, non-overlapping, regions (or blocks), and each 8×8 block is coded with:

-   -   Forming a block of DCT (Discrete Cosine Transform) coefficients         with application of the 8×8 DCT on the original data block     -   Quantizing these DCT coefficients (e.g., dividing each         coefficient with a scale factor)     -   Further coding the quantized coefficients using a VLC (Variable         Length Coder) encoder.         In a JPEG decoder, each coded block is decoded with a process         that comprises essentially the inverse of the encoding process,         described directly above. For example:     -   After VLC decoding, a block of 8×8 DCT coefficients is extracted     -   After inverse quantization (e.g., multiplying each DCT         coefficient with a scale factor), a set of un-quantized DCT         coefficients is derived     -   After applying an 8×8 inverse DCT (IDCT), an approximation of         the original 8×8 pixel data is extracted

In an example embodiment, the post-processing command comprises a command to down-scale the HDR image, e.g., by a factor of two. For JPEG-coded images, an alternative way to downscale the image by a factor of two comprises decoding the top left 4×4 block of DCT coefficients in each received 8×8 block (e.g., and leaving the remaining 4×4 blocks undecoded). Thus, an embodiment of partial decoding of the baseline and ratio images according to a post-processing command (e.g., steps 315 and 325), wherein the command is to downscale the decoded image by a factor of two, may comprise the following steps:

For each 8×8 block:

-   -   Perform VLC decoding to extract 8×8 DCT coefficients     -   Perform partial inverse quantization (e.g., dequantize the top         left 4×4 block of the DCT coefficients)     -   Perform a 4×4 IDCT on the de-quantized 4×4 DCT block     -   Combine 4×4 blocks to provide down-scaled by 2 baseline and         ratio images         If no additional post-processing (e.g., steps 420 and 430) is         required on the two sub-images, then the two images may be         combined and sent for display. Otherwise, additional         post-processing may be performed as may be beneficial.

A similar approach may also be followed when downscaling by a factor of 4, except that the baseline and ratio image decoders need only perform an IDCT on the top left 2×2 DCT coefficients of each block.

Some embodiments may also implement alternative up-scaling and down-scaling processing techniques in the compressed domain, such as those described by R. Dugad and N. Ahuja, in “A fast scheme for image size change in the compressed domain,” in IEEE Trans. on Circuits and Systems for Video Technology, Vol. 11, No. 4, April 2001, pp. 461-474, which is incorporated herein by reference.

In an embodiment, wherein the down-scaling scaling factor is not simply a multiple of 2,4, or 8, a downscaling by 8, 4 or by 2 operation in the DCT domain may be followed by another up-scaling or down-scaling operation of the decoded baseline and ratio images using traditional spatial domain image processing techniques. For example, since 6=2×3, down-scaling by a factor of 6 may be performed by (a) downscaling by a factor of 2 in the DCT domain (e.g., steps 415 and 425), followed by downscaling by a factor of 3 in the spatial domain (e.g., steps 420 and 430).

In another embodiment, the process that is described with reference to FIG. 3 is applied to an image windowing operation. In this example embodiment, a portion of the original HDR image 310 is displayed, instead of displaying the entire image. As a portion of the decoded HDR image will be displayed, computational and memory costs are relatively low (e.g., in relation to costs associated with displaying the entire HDR image). Thus, a decoder may perform a partial decoding of the HDR sub-images in the spatial domain. Decoding a JPEG-HDR image according to an embodiment may thus comprise the following steps on each of the baseline and ratio images:

-   -   Perform VLC decoding to extract the coded 8×8 blocks     -   Perform partial decoding, by applying inverse quantization and         IDCT to the coded 8×8 blocks to be visible after windowing     -   Scale the windowed baseline and ratio images as appropriate     -   Combine the scaled baseline and ratio images to create a         windowed HDR image     -   Display the windowed HDR image

The methods described herein for decoding and post-processing JPEG-HDR images can easily be extended to other HDR image formats that may encapsulate an HDR image using two or more SDR-like sub-images. Such formats may be based in other still-image and video coding formats, including the family of MPEG (Motion Picture Experts

Group) video coding standards (e.g., MPEG-1, MPEG-2, and MPEG-4), the JPEG2000 coding standard, and others.

Example Computer System Implementation

Embodiments of the present invention may be implemented with a computer system, systems configured in electronic circuitry and components, an integrated circuit (IC) device such as a microcontroller, a field programmable gate array (FPGA), or another configurable or programmable logic device (PLD), a discrete time or digital signal processor (DSP), an application specific IC (ASIC), and/or apparatus that includes one or more of such systems, devices or components. The computer and/or IC may perform, control, or execute instructions relating to the decoding, image post- processing, and display of HDR images, such as those described herein. The computer and/or IC may compute any of a variety of parameters or values that relate to guided image up-sampling as described herein. The image and video embodiments may be implemented in hardware, software, firmware and various combinations thereof.

Certain implementations of the invention comprise computer processors which execute software instructions which cause the processors to perform a method of the invention. For example, one or more processors in a display, an encoder, a set top box, a transcoder or the like may implement HDR image processing methods as described above by executing software instructions in a program memory accessible to the processors. The invention may also be provided in the form of a program product. The program product may comprise any medium which carries a set of computer-readable signals comprising instructions which, when executed by a data processor, cause the data processor to execute a method of the invention. Program products according to the invention may be in any of a wide variety of forms. The program product may comprise, for example, physical media such as magnetic data storage media including floppy diskettes, hard disk drives, optical data storage media including CD ROMs, DVDs, electronic data storage media including ROMs, flash RAM, or the like. The computer-readable signals on the program product may optionally be compressed or encrypted.

Where a component (e.g. a software module, processor, assembly, device, circuit, etc.) is referred to above, unless otherwise indicated, reference to that component (including a reference to a “means”) should be interpreted as including as equivalents of that component any component which performs the function of the described component (e.g., that is functionally equivalent), including components which are not structurally equivalent to the disclosed structure which performs the function in the illustrated example embodiments of the invention.

Equivalents, Extensions, Alternatives And Miscellaneous

Example embodiments that relate to the efficient decoding and image processing of HDR images are thus described. In the foregoing specification, embodiments of the present invention have been described with reference to numerous specific details that may vary from implementation to implementation. Thus, the sole and exclusive indicator of what is the invention, and is intended by the applicants to be the invention, is the set of claims that issue from this application, in the specific form in which such claims issue, including any subsequent correction. Any definitions expressly set forth herein for terms contained in such claims shall govern the meaning of such terms as used in the claims. Hence, no limitation, element, property, feature, advantage or attribute that is not expressly recited in a claim should limit the scope of such claim in any way. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense. 

1. A method to decode a coded HDR image with a processor, the method comprising: accessing the coded HDR (high dynamic range) image, the HDR image comprising a first coded image and a second coded image; decoding the first coded image according to a post-processing command to output a first decoded image; decoding the second coded image according to the post-processing command to output a second decoded image; and combining the first decoded image and the second image to output a decoded HDR image.
 2. The method of claim 1, wherein the first coded image comprises a plurality of coded regions, and decoding the first coded image according to the post-processing command comprises a partial decoding of the first coded image.
 3. The method of claim 2, wherein the partial decoding comprises decoding only a sub-set of the total number of the plurality of coded regions in the first coded image.
 4. The method of claim 2, wherein each of the plurality of coded regions is coded using a plurality of transform coefficients, and the partial decoding of the first coded image comprises: for each coded region, decoding only a subset of the total number of the plurality of transform coefficients used to code said coded region.
 5. The method of claim 1, wherein the second coded image comprises a plurality of coded regions, and decoding the second coded image according to the post-processing command comprises a partial decoding of the second coded image.
 6. The method of claim 5, wherein the partial decoding comprises decoding only a sub-set of the total number of the plurality of coded regions in the second coded image.
 7. The method of claim 5, wherein each of the plurality of coded regions is coded using a plurality of transform coefficients, and the partial decoding of the second coded image comprises: for each coded region, decoding only a subset of the total number of the plurality of transform coefficients used to code said coded region.
 8. The method of claim 1, wherein the post-processing command comprises at least one of a down-scaling command, an up-scaling command, and a windowing command.
 9. The method of claim 1, wherein the first coded image comprises a coded baseline image and the second coded image comprises a coded ratio image.
 10. The method of claim 1, wherein the HDR coded image comprises a JPEG-HDR image, the first coded image comprises a JPEG-coded baseline image comprising a plurality of 8×8 coded baseline image blocks, and the second coded image comprises a JPEG-coded ratio image comprising a plurality of coded ratio image blocks.
 11. The method of claim 10, wherein decoding the JPEG-coded baseline image comprises performing an N×N IDCT (Inverse Discrete Cosine Transform) on each one of the plurality of the coded 8×8 baseline blocks, where N is a positive integer smaller than 8 but larger or equal to
 1. 12. The method of claim 10, wherein decoding the JPEG-coded ratio image comprises performing an N×N IDCT on each one of the plurality of the coded ratio blocks, where N comprises a positive integer smaller than 8 but larger or equal to
 1. 13. The method of claim 11, wherein N has a value that is equal to 1, 2, or
 4. 14. The method of claim 12, wherein N has a value that is equal to 1, 2, or
 4. 15. The method of claim 10, wherein decoding the JPEG-coded baseline image comprises decoding a sub-set of the plurality of the coded 8×8 baseline image blocks.
 16. The method of claim 10, wherein decoding the JPEG-coded ratio image comprises decoding a sub-set of the plurality of the coded ratio image blocks.
 17. The method of claim 1, further comprising: before the combining step, post-processing the first decoded image according to the post-processing command wherein a post-processed first decoded image is formed, wherein the combining step comprises combining the post-processed first decoded image and the second decoded image.
 18. The method of claim 1, further comprising: before the combining step, post-processing the second decoded image according to the post-processing command wherein a post-processed second decoded image is formed, wherein the combining step comprises combining the post-processed second decoded image and the first decoded image.
 19. The method of claim 1, further comprising: before the combining step, post-processing the first decoded image according to the post-processing command wherein a post-processed first decoded image is formed; and post-processing the second decoded image according to the post-processing command wherein a post-processed second decoded image is formed, wherein the combining step comprises combining the post-processed first decoded image and the post-processed second decoded image.
 20. A method comprising: receiving an HDR (high dynamic range) coded image comprising a first coded image and a second coded image; decoding, at least in part, the first coded image according to a post-processing command to output a first decoded image; decoding, at least in part, the second coded image according to the post-processing command to output a second decoded image; combining the first decoded image and the second image to output a decoded HDR image.
 21. An apparatus comprising a processor and configured to decode a coded HDR image, the decoding comprising: accessing the coded HDR image, the HDR image comprising a first coded image and a second coded image; decoding with the processor the first coded image according to a post-processing command to output a first decoded image; decoding with the processor the second coded image according to the post-processing command to output a second decoded image; and combining the first decoded image and the second image to output a decoded HDR image.
 22. The apparatus of claim 21, wherein the coded HDR image comprises a JPEG-HDR image, the first coded image comprises a JPEG-coded baseline image comprising a plurality of 8×8 coded baseline image blocks, and the second coded image comprises a JPEG-coded ratio image comprising a plurality of coded ratio image blocks.
 23. A non-transitory computer-readable storage medium having stored thereon computer-executable instruction for executing a method to decode a coded HDR image, the decoding comprising: accessing the coded HDR image, the image comprising a first coded image and a second coded image; decoding with the processor the first coded image according to a post-processing command to output a first decoded image; decoding with the processor the second coded image according to the post-processing command to output a second decoded image; and combining the first decoded image and the second image to output a decoded HDR image. 